cmake_minimum_required(VERSION 3.10)

include_directories(${CMAKE_SOURCE_DIR}/common/net/connect)
include_directories(${CMAKE_SOURCE_DIR}/common/vdev)
include_directories(${CMAKE_SOURCE_DIR}/services/service_base)

link_directories(${CMAKE_BINARY_DIR}/common/vdev)

set(BASE_FILES
        cm_avprocess.c
        cm_avprocess.h
        process.c
        process.h
        CMStorageBase.cpp
        CMStorageBase.h
        CMStorageManager.cpp
        CMStorageManager.h
        CMStorageRecord.cpp
        CMStorageRecord.h
        CMRecordService.cpp
        CMRecordService.h
        CMRecordServiceInterface.cpp
        CMRecordServiceInterface.h
        )

add_executable(cm_avprocess_test
        ${BASE_FILES}
        cm_avprocess_test.c
)
target_link_libraries(cm_avprocess_test
        cm-vdev
        cm-codec
        cm-storage
        net
        utils
)

add_executable(jkrecord
        ${BASE_FILES}
        jkrecord.c
        )
target_link_libraries(jkrecord
        cm-vdev
        cm-codec
        cm-storage
        net
        utils
)

add_library(service-recordserver
        ${BASE_FILES}
)
